//
//  ZMXHelper.h
//  OpenSource
//
//  Created by QIANFENG on 14-9-13.
//  Copyright (c) 2014年 LZXuan. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
//#import "NSString+Hashing.h"
@interface CJJHelper : NSObject

+ (NSDate *)convertToDateFrom:(NSString *)dateString;
+ (NSString *)stringFromDate:(NSDate*)aDate;



//把一个数字时间串转化为date 格式的字符串
//1409018400 转化为 2014-8-26 XX:XX:XX
+ (NSString *)dateStringFormNumberString:(NSString *)str;
//根据字符串内容 获取label 的真实的高度
+ (CGFloat)textHeightFromString:(NSString *)textStr width:(CGFloat)width  fontSize:(CGFloat)fontZize;
+ (CGFloat)textWidthFromString:(NSString *)textStr height:(CGFloat)height fontSize:(CGFloat)fontSize;
//提供类方法 获取 屏幕大小
+ (CGSize)getScreenSize;

/**
 *  是否是iOS7
 */
+ (BOOL)isiOS7;

/**
 *  去除空格
 *
 *  @param str 出入字符串
 */
+ (NSString *)trimmingWhitespace:(NSString *)str;

/**
 *  保存登陆的信息
 *
 *  @param dict 登陆后返回的字典
 */
+ (void)saveInformation:(NSDictionary *)dict key:(NSString *)key;
/**
 *  获取本地保存登录信息
 *
 *  @param key  description
 */
+ (id)getMessageFromKey:(NSString *)key;


+ (NSString *)convertFrom:(double)num;

+ (NSString*)dictionaryToJson:(id)dic;

+ (id)objectFromJson:(NSString *)dicStr;

+ (NSString *)checkString:(NSString *)str;

////获取缓存文件的路径  沙盒/Library/Caches/MyCache/XXXXXXX
//
//+ (NSString *)getFullCachePathFromUrl:(NSString *)url;
//
////判断缓存文件是否有效
////timer 设置 有效时间   一般 缓存文件 设置有效时间60*60s 一小时
//
//+ (BOOL)isOutTimeFromUrl:(NSString *)url time:(double)timer;
@end
